/** When your routing table is too long, you can split it into small modules**/
import pageComponentName from '@/config/page-component-name'
import Layout from '@/layout/index.vue'

const storageRouter = [
  {
    path: '/storage',
    component: Layout,
    name: 'storage',
    meta: {
      title: '仓库管理',
      icon: 'Box',
    },
    children: [
      {
        path: 'list',
        component: () => import('@/views/storage/list/index.vue'),
        name: 'depotList',
        meta: {
          title: '仓库列表',
          keepAlive: true,
          componentName: pageComponentName.storage.storageList,
        },
      },
      {
        path: 'intb',
        component: () => import('@/views/storage/intb/index.vue'),
        name: 'intRecord',
        meta: {
          title: '入库列表',
          keepAlive: true,
          componentName: pageComponentName.storage.inStorageList,
        },
      },
      {
        path: 'outb',
        component: () => import('@/views/storage/outb/index.vue'),
        name: 'outRecord',
        meta: {
          title: '出库列表',
          keepAlive: true,
          componentName: pageComponentName.storage.outStorageList,
        },
      },
      {
        path: 'log',
        component: () => import('@/views/storage/loglist/index.vue'),
        name: 'logList',
        meta: {
          title: '物流列表',
          keepAlive: true,
          componentName: pageComponentName.storage.logisticsList,
        },
      },
      // {
      //   path: 'sale',
      //   component: () => import('@/views/storage/sale/index.vue'),
      //   name: 'Salerecord',
      //   meta: { title: '销售记录', keepAlive: true },
      // },
      {
        path: 'detail/:id',
        component: () => import('@/views/storage/list/detail/detail.vue'),
        name: 'detailStore',
        meta: {
          title: '仓库详情',
          keepAlive: true,
          componentName: pageComponentName.storage.sotrageDetail,
        },
        hidden: true,
      },
      {
        path: 'outb/detail/:id',
        component: () => import('@/views/storage/outb/detail.vue'),
        name: 'detailOutStore',
        meta: {
          title: '出库详情',
          keepAlive: true,
          componentName: pageComponentName.storage.outStorageDetail,
        },
        hidden: true,
      },
      {
        path: 'intb/detail/:id',
        component: () => import('@/views/storage/intb/detail.vue'),
        name: 'detailIntbStore',
        meta: {
          title: '入库详情',
          keepAlive: true,
          componentName: pageComponentName.storage.inStorageDetail,
        },
        hidden: true,
      },
      // {
      //   path: 'inven',
      //   component: () => import('@/views/storage/inven/index.vue'),
      //   name: 'Inven',
      //   meta: { title: '仓库库存', keepAlive: true },
      // },
      // 跳转页面
      {
        // 新增出库
        path: 'newout',
        component: () => import('@/views/storage/outb/new/index.vue'),
        name: 'newOut',
        meta: {
          title: '新增出库',
          keepAlive: false,
          componentName: pageComponentName.storage.outStorageCreate,
        },
        hidden: true,
      },
      {
        // 出库详情
        path: 'newout/:id',
        component: () => import('@/views/storage/outb/new/index.vue'),
        name: 'detailOut',
        meta: {
          title: '出库详情',
          keepAlive: false,
          componentName: pageComponentName.storage.outStorageCreate,
        },
        hidden: true,
      },
      {
        // 新增入库
        path: 'newin',
        component: () => import('@/views/storage/intb/new/index.vue'),
        name: 'newIn',
        meta: {
          title: '新增入库',
          keepAlive: false,
          componentName: pageComponentName.storage.inStorageCreate,
        },
        hidden: true,
      },
      {
        // 入库详情
        path: 'newin/:id',
        component: () => import('@/views/storage/intb/new/index.vue'),
        name: 'detailIn',
        meta: {
          title: '入库详情',
          keepAlive: false,
          componentName: pageComponentName.storage.inStorageCreate,
        },
        hidden: true,
      },
    ],
  },
]

export default storageRouter
